#include <mmu.h>
#include <memlayout.h>

    .section .text,"ax",%progbits
    .globl kern_entry
kern_entry:
    la sp, bootstack + KSTACKSIZE
    slli t0, a0, KSTACKSHIFT
    add sp, sp, t0

    mv s0, zero

    tail kern_init

.section .data
    .align PGSHIFT
    .global bootstack
bootstack:
    .space KSTACKSIZE * 8
